<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript 对象</title>

    <script>
        function p(username, password) {
            this.username = username;
            this.password = password;
            this.func = function () {
                alert(111);
            }
        }

        person = new Object();
        person.username = "张三";
        person.passwrod = "1233333"

        person = new p("李四", "54321");
        document.write(person.username + "的密码是：" + person.password);
        person.func();
    </script>
</head>
<body>
<a href="http://localhost:63342/javascript/JavaScript%20RegExp%20对象.html?_ijt=j1c0f6n6ibpmgtk1nb9bohiul6">下一页</a>
</body>
</html>